home *** CD-ROM | disk | FTP | other *** search
/ Internet Info 1994 March / Internet Info CD-ROM (Walnut Creek) (March 1994).iso / networking / ip / ka9q / src.arc / ECCMD.C < prev    next >
C/C++ Source or Header  |  1989-08-16  |  808b  |  34 lines

  1. #include <stdio.h>
  2. #include "global.h"
  3. #include "mbuf.h"
  4. #include "iface.h"
  5. #include "ec.h"
  6. #include "enet.h"
  7.  
  8. int
  9. doetherstat(argc,argv,p)
  10. int argc;
  11. char *argv[];
  12. void *p;
  13. {
  14.     register struct ec *ecp;
  15.     char buf[20];
  16.  
  17.     for(ecp = Ec;ecp < &Ec[Nec]; ecp++){
  18.         pether(buf,ecp->iface->hwaddr);
  19.         printf("Controller %u, Ethernet address %s\n",ecp-Ec,buf);
  20.  
  21.         printf("recv      bad       overf     drop      nomem     intrpt\n");
  22.         printf("%-10lu%-10lu%-10lu%-10lu%-10lu%-10lu\n",
  23.          ecp->estats.recv,ecp->estats.bad,ecp->estats.over,
  24.          ecp->estats.drop,ecp->estats.nomem,ecp->estats.intrpt);
  25.  
  26.         printf("xmit      timeout   jam       jam16\n");
  27.         printf("%-10lu%-10lu%-10lu%-10lu\n",
  28.          ecp->estats.xmit,ecp->estats.timeout,ecp->estats.jam,
  29.          ecp->estats.jam16);
  30.     }
  31.     return 0;
  32. }
  33.  
  34.